<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>new (ZooomrRestAPI)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File Zooomr.rb, line 38</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">a_api_key</span>, <span class="ruby-identifier">a_shared_secret</span>)
    <span class="ruby-keyword kw">if</span> (<span class="ruby-keyword kw">nil</span>.<span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">a_api_key</span>))
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;API KEY is nil&quot;</span>, <span class="ruby-identifier">caller</span>
    <span class="ruby-keyword kw">end</span>

    <span class="ruby-keyword kw">if</span> (<span class="ruby-keyword kw">nil</span>.<span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">a_shared_secret</span>))
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;SHARED SECRET is nil&quot;</span>, <span class="ruby-identifier">caller</span>
    <span class="ruby-keyword kw">end</span>
    
    <span class="ruby-ivar">@api_key</span>        = <span class="ruby-identifier">a_api_key</span>
    <span class="ruby-ivar">@shared_secret</span>  = <span class="ruby-identifier">a_shared_secret</span>
    
    <span class="ruby-ivar">@photos</span>     = <span class="ruby-constant">ZooomrPhotos</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@people</span>     = <span class="ruby-constant">ZooomrPeople</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@auth</span>       = <span class="ruby-constant">ZooomrAuth</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@activity</span>   = <span class="ruby-constant">ZooomrActivity</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@contacts</span>   = <span class="ruby-constant">ZooomrContacts</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@favorites</span>  = <span class="ruby-constant">ZooomrFavorites</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@groups</span>     = <span class="ruby-constant">ZooomrGroups</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@photosets</span>  = <span class="ruby-constant">ZooomrPhotosets</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@tags</span>       = <span class="ruby-constant">ZooomrTags</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@test</span>       = <span class="ruby-constant">ZooomrTest</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@upload</span>     = <span class="ruby-constant">ZooomrUpload</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
    <span class="ruby-ivar">@zipline</span>    = <span class="ruby-constant">ZooomrZipline</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>